<html><head><title>OpenPack</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">OpenPack()</font></b></p>
<p><b>Syntax</b></p><blockquote>
Result = <font color="#006666"><b>OpenPack</b></font>(#Pack, Filename$ [, PluginID])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Open a previously existing pack file. Before opening a pack file, at least one packer has to be registered 
with one of the following command: <a href="usezippacker.html">UseZipPacker()</a>, <a href="uselzmapacker.html">UseLZMAPacker()</a>, <a href="usebrieflzpacker.html">UseBriefLZPacker()</a>. 
Once opened, the pack content can be listed with <a href="examinepack.html">ExaminePack()</a>. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Pack</i></td>
<td width="90%"> 
A number to identify pack file to open. <a href="../reference/purebasic_objects.html">#PB_Any</a> can be used as 
a parameter to auto-generate this number. 

</td></tr>
<tr><td><i>Filename$</i></td>
<td> 
The filename for the pack file to open. 

</td></tr>
<tr><td><i>PluginID (optional)</i></td>
<td> 
The plugin to use, if more than one packer plugin has been registered. It can be one of the following value: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_PackerPlugin_BriefLZ</font>: use the BriefLZ packer to open the pack file. <a href="usebrieflzpacker.html">UseBriefLZPacker()</a> has to be called to have any effect.
  <font color="#924B72">#PB_PackerPlugin_Zip</font>    : use the Zip packer to open the pack file. <a href="usezippacker.html">UseZipPacker()</a> has to be called to have any effect.
  <font color="#924B72">#PB_PackerPlugin_LZMA</font>   : use the LZMA packer to open the pack file. <a href="uselzmapacker.html">UseLZMAPacker()</a> has to be called to have any effect.
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>

Returns nonzero if the pack file has been successfully opened, zero otherwise. If <font color="#924B72">#PB_Any</font> 
was used as the #Pack parameter then the generated pack number is returned. 

<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">  UseZipPacker</font>()

  <font color="#006666">; Open the packed file</font>
  <b><font color="#006666">If</font></b> <font color="#006666">OpenPack</font>(0, "mycompressedfiles.zip") 
    
    <font color="#006666">; List all the entries</font>
    <b><font color="#006666">If</font></b> <font color="#006666">ExaminePack</font>(0)
      <b><font color="#006666">While</font></b> <font color="#006666">NextPackEntry</font>(0)
        <b><font color="#006666">Debug</font></b> "Name: " +<font color="#006666"> PackEntryName</font>(0) + ", Size: " +<font color="#006666"> PackEntrySize</font>(0)
      <b><font color="#006666">Wend</font></b>
    <b><font color="#006666">EndIf</font></b>
    
<font color="#006666">    ClosePack</font>(0)
  <b><font color="#006666">EndIf</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="closepack.html">ClosePack()</a>, <a href="examinepack.html">ExaminePack()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=nextpackentry.html>NextPackEntry()</a> - <a href=index.html>Packer Index</a> - <a href=packentryname.html>PackEntryName()</a> ->

</body></html>